package cn.ickck.law_paper_final.service.Impl;

import cn.ickck.law_paper_final.mapper.CreditCardMapper;
import cn.ickck.law_paper_final.model.entity.CreditCard;
import cn.ickck.law_paper_final.service.CreditCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: ck
 * @Description:
 * @Date: Create in 16:27 2020/10/17
 */
@Service
public class CreditCardServiceImpl implements CreditCardService {

    @Autowired
    private CreditCardMapper creditCardMapper;

    @Override
    public void insert(CreditCard creditCard) {
        creditCardMapper.insert(creditCard);
    }

    @Override
    public void update(CreditCard creditCard) {
        creditCardMapper.update(creditCard);
    }

    @Override
    public List<CreditCard> findAll() {
        return creditCardMapper.findAll();
    }

    @Override
    public void deleteById(Integer id) {
        creditCardMapper.deleteById(id);
    }


    @Override
    public int count() {
        return creditCardMapper.count();
    }


    @Override
    public List<CreditCard> selectByPage(int start, int end) {
        return creditCardMapper.selectByPage(start,end);
    }

    @Override
    public List<CreditCard> findByNameOrKey(String key) {
        return creditCardMapper.findByNameOrKey(key);
    }


    @Override
    public void deleteByKey(String key) {
        creditCardMapper.deleteByKey(key);
    }
}
